(function ($) {
    "use strict";

    var modalId = "showSubTask";

    $('#' + modalId).SearchPage({
        url: "/dbschedule/task/getSubTaskByTaskId/" + getModalData(modalId),
        modalId: modalId,
        dataTable: false,
        isCheck: false,
        autoRefresh:  true,
        singleRefresh: true,
        columns: [
            {label: 'label.partitionCount', code: 'partitionCount', width: '5rem', align: 'center'},
            {label: 'label.partitionIndex', code: 'partitionIndex', width: '5rem',  align: 'center'},
            {label: 'label.status', code: 'status', width: '8rem',  align: 'center', translateFor: 'taskStatus', addClass: 'badge-text badge-text-small status', addClassFun: function(data){return data.statusLevel}},
            {label: 'label.executeServerIp', code: 'executeServerIp', width: '10rem',  align: 'center', defaultValue: '-'},
            {label: 'label.executeServerPort', code: 'executeServerPort', width: '7rem', align: 'center', defaultValue: '-'},
            {label: 'label.errorMessage', code: 'errorMessage', textEllipsis: true}
        ]
    });
})(jQuery);